$stat =
wave.rtrim ("<Source Filename>", [Millisec], "[Destination Filename]")
This function is to trim the audio data from a wave file from its extreme right end.
The duration or length of the audio can be specified in the function.
Parameters
<Source Filename>
Specify the name of source file.
<Millisec>
Specify the duration or length of audio data to be trimed in milliseconds.
<Destination Filename>
Specify the name of the destination file.
Return Value
Returns 1 on success and 0 on failure.
Remark
We cannot use this function in a GSM compressed file. If the file is GSM, then convert this file into PCM, then rtrim it.
If the destination file is not mentioned as a parameter, then the source file itself is overwritten.
Example
-
$stat = wave.rtrim ("bgplay.wav", 1000, "out.wav")
- The source wavefile is trimed 1000 millisec from the right end and wrote to destination file.
On successful excecution of the function $stat returns the value 1.